package com.tarena.lbs.business.dao.repository;

import com.github.pagehelper.PageInfo;
import com.tarena.lbs.business.pojo.po.BusinessPO;
import com.tarena.lbs.business.pojo.po.StorePO;
import com.tarena.lbs.business.pojo.query.BusinessQuery;

import java.util.List;

public interface BusinessRepository {
    
    /**
     * 根据ID查询商家信息
     */
    BusinessPO getBusinessById(Integer id);
    
    /**
     * 根据负责人电话查询商家信息
     */
    BusinessPO getBusinessByPhone(String phone);
    
    /**
     * 保存商家信息
     */
    void save(BusinessPO businessPO);
    

    /**
     * 分页查询商家列表
     */
    PageInfo<BusinessPO> pagesList(BusinessQuery query);

    List<StorePO> getStoresByBusinessId(Integer businessId);

    /**
     * 查询所有商家
     */
    List<BusinessPO> getBusinesses();
}
